<template>
    <svg class="icon" aria-hidden="true" v-bind="$attrs" v-on="$listeners">
        <use :xlink:href="icon"></use>
    </svg>
</template>
<script>
/*require("../assets/iconfont/iconfont.js");*/
import '../../assets/iconfont/iconfont.js';

export default {
    name: 'IconFont',
    props: {
        name: {
            type: String,
            default: ''
        }
    },
    computed: {
        icon() {
            return '#icon' + this.name;
        }
    }
};
</script>

<style>
.icon {
    width: 42px;
    height: 42px;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
}
</style>
